package game.Screens;

import game.Game;
import game.LevelManager;
import game.Config.Config;
import game.Config.Config.GameInput;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;

/**
 * This is the screen that is published when the player dies.
 * @author Sebastian Isheden and Victor Beer.
 *
 */
public class DefeatScreen extends Screen{

	/**
	 * Resetes the level.
	 */
	@Override
	public void begin() {
		LevelManager.resetLevel();
		
		
	}

	@Override
	public void end() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void update(GameContainer gc, int delta) {
		// TODO Auto-generated method stub
		
	}

	/**
	 * Draws the game over message.
	 */
	@Override
	public void draw(Graphics graphic) {
		graphic.drawString("You have lost the game. Press escape to exit to the main menu.", Config.DIFFICULTY_POSITION.x, Config.DIFFICULTY_POSITION.y);
		
	}

	/**
	 * Updates the input.
	 */
	@Override
	public void inputPressed(GameInput input) {
		if(input == GameInput.BACK){
			Game.screenStack.pop();
		}
		
	}

	@Override
	public void inputDown(GameInput input) {
		// TODO Auto-generated method stub
		
	}

}
